<ion-view view-title="优惠券" class="issuediscount">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>

	<!--描述：滑动块-->
	<ion-content class="has-header has-footer bg" >
		<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
		<div class="item nolist text-center" ng-if="list.length==0||list==null">
			<img src="./img/guilin/promo/no-coupon@2x.png" />
			<p class="textone">还没有优惠券</p>
			<p class="texttwo">赶快添加吧！</p>
		</div>
		<div class="list margin-bottom-10" ng-repeat="item in list" >
			<div class="item maxframe" on-tap="onshow_adddiscount(item.id,item.issue_type)">
				<div class="leftframe">
					<div class="item-input discountnameframe">
						<span class="pingtai" ng-if="item.issue_type==0">平台</span>
						<p class="discountname">{{item.name}}</p>
					</div>
					<div class="item-input sharetext">
						<p>有效时间：{{item.termofvalidity}}</p>
					</div>
					<div class="item-input sharetext">
						<p> 使用条件：{{item.condition}}</p>
					</div>
					<div class="item-input sharetext" ng-if="item.issue_count&&item.issue_count!=0">
						发行数量：{{item.issue_count}}张
					</div>
					<div class="item-input sharetext" ng-if="item.draw_count&&item.draw_count!=0">
						已领数量：{{item.draw_count}}张
					</div>
				</div>
				<div class="rightframe">
					<div class="amountframe">
						<span class="jia">￥</span>
						<span class="amount">{{item.amount}}</span>
					</div>
					<img src="{{item.qrcode}}" ng-if="item.issue_type!=0" on-tap="openFileActSheet($event,$index)" />
				</div>
			</div>
			<div class="item btnframe">
				<span class="statustext" ng-if="item.issue_count&&item.issue_count!=0">{{item.status}}</span>
				<div on-tap="clickbtn(btn.error,btn.id,item.id,item.issue_type)" class="btns" ng-repeat="btn in item.buttons" style="border-color: {{btn.color}};color:{{btn.color}};">{{btn.name}}</div>

			</div>
		</div>
		<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
	</ion-content>
	<div class="bar bar-footer">
		<div class="addclerk" on-tap="onshow_adddiscount('',1)">添加优惠券</div>
	</div>
</ion-view>